/**
 * 创业管理
 */

import http from '@/utils/httpRequest'

export default {
    // 课程分类Tree
    getAllStudy() {
        return http.get(http.adornUrl('/admin/studyingtype/getAllStudy'))
    },
    // 新增课程分类
    studyingtypeAdd(data) {
        return http.post(http.adornUrl('/admin/studyingtype/add'),data)
    },
    // 删除课程分类
    studyingtypeDel(id) {
        return http.delete(http.adornUrl(`/admin/studyingtype/delete/${id}`))
    },
     // 获取课程分类详情
     studyingtypeInfo(id) {
        return http.get(http.adornUrl(`/admin/studyingtype/${id}`))
    },
    // 修改课程分类
    studyingtypeUpdate(data) {
        return http.put(http.adornUrl(`/admin/studyingtype/update`),data)
    },
    // 新增课程
    studyingAdd(data) {
        return http.post(http.adornUrl(`/admin/studying/add`),data)
    },
    // 修改课程
    studyingUpdate(data) {
        return http.put(http.adornUrl(`/admin/studying/update`),data)
    },
    // 删除课程
    studyingDel(id) {
        return http.delete(http.adornUrl(`/admin/studying/delete/${id}`))
    },
    // 获取课程
    studyingInfo(id) {
        return http.get(http.adornUrl(`/admin/studying/${id}`))
    },
    // 课程列表
    studyingList(param) {
        return http.get(http.adornUrl(`/admin/studying/list`),{params:param})
    },
    // 课程下架推荐
    headerORstatus(data) {
        return http.post(http.adornUrl(`/admin/studying/headerORstatus`),data)
    },

    // 章节详情
    studyingDetail(id) {
        return http.get(http.adornUrl(`/admin/studyingDetail/${id}`))
    },
     // 章节列表
     studyingDetailList(param) {
        return http.get(http.adornUrl(`/admin/studyingDetail/list`),{params:param})
    },
     // 下架课程章节
     studyingDetailDisable(id) {
        return http.delete(http.adornUrl(`/admin/studyingDetail/disable/${id}`))
    },
     // 修改课程章节
     studyingDetailUpdate(data) {
        return http.put(http.adornUrl(`/admin/studyingDetail/update`),data)
    },
    // 新增课程章节
    studyingDetailAdd(data) {
        return http.post(http.adornUrl(`/admin/studyingDetail/add`),data)
    },
    // 删除课程分类
    studyingDetailDel(id) {
        return http.delete(http.adornUrl(`/admin/studyingDetail/delete/${id}`))
    },
}